package com.itheima.test.test5;

public class student {
    private String name;
    private int age;

    //如果我们没有自己写任何构造方法，那么虚拟机会默认提供一个无参构造方法
    public student(){
        System.out.println("看看我执行了吗");
    }

    //带参构造
    public student(String name,int age){
        this.name = name;
        this.age = age;
    }

    public String getName(){
        return name;
    }
    public void setName(String name){
        this.name = name;
    }

    public int getAge(){
        return age;
    }
}
